class CreateUserInfos < ActiveRecord::Migration
  def change
    create_table :user_infos, :force => true do |t|
      t.string  :name,       :limit => 15, :null => true
      t.string  :surname,    :limit => 30, :null => false
      t.string  :email,      :limit => 50, :null => true
      t.text    :note,                     :null => true
      t.string  :phone,  :limit => 16, :null => true
      t.references :billing_address,  :null => true
      t.references :shipping_address, :null => true
      t.timestamps
    end

    add_index :user_infos, :email
  end
end